package com.demo2.service;

import com.demo2.model.User;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    @Bean
    public User user1() {
        User user = new User();
        user.setId(1);
        user.setName("周杰伦");
        return user;
    }

    @Bean
    public User user2() {
        User user = new User();
        user.setId(2);
        user.setName("林俊杰");
        return user;
    }

}
